package com.flw.eslab.service.impl;

import java.io.File;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.flw.eslab.dao.IpLogDao;
import com.flw.eslab.dto.PageInfo_Dto;
import com.flw.eslab.model.Info;
import com.flw.eslab.model.IpLog;
import com.flw.eslab.service.IpLogManager;

@Service("ipLogManager")
public class IpLogManagerImpl implements IpLogManager {
	@Resource
	private IpLogDao ipLogDao;
	public IpLogDao getIpLogDao() {
		return ipLogDao;
	}

	public void setIpLogDao(IpLogDao ipLogDao) {
		this.ipLogDao = ipLogDao;
	}

	@Override
	public boolean add(IpLog ipLog) {
		ipLogDao.save(ipLog);
		return true;
	}

	@Override
	public PageInfo_Dto load(PageInfo_Dto pageInfo_Dto) {
		int pageNow=pageInfo_Dto.getPageNow()==null?1:pageInfo_Dto.getPageNow();
		int pageSize=pageInfo_Dto.getPagesize()==null?5:pageInfo_Dto.getPagesize();	
		return ipLogDao.findByPageInfo(IpLog.class, pageNow, pageSize, null, null);
	}

	@Override
	public File output() {
		return null;
	}

}
